<template>
	<view class="addDaili">

		<u-steps class="bg-blue" current="1" activeIcon="checkmark" inactiveIcon="arrow-right">
			<u-steps-item title="基本信息"/>
			<u-steps-item title="成本信息"/>
		</u-steps>
<!-- 刷卡成本 -->
		<view class="padding-2 flex align-center">
			<view class="content">
				<text class="text-black text-df">刷卡成本</text>
			</view>
			<view class="action">
				<button class="cu-btn style-color">修改</button>

			</view>
		</view>

	<view class="cu-list grid text-gray col-4">
			<view class="cu-item">

			</view>
			<view class="cu-item">
				T+1
			</view>
			<view class="cu-item">
				T+0
			</view>

			<view class="cu-item">
				下级分成
			</view>
		</view>
	
	<view class="cu-list grid text-black col-4">
			<view class="cu-item">
			借记卡
			</view>
			<view class="cu-item">
			0.4%	
			<text> 18元封顶</text>
			</view>
			<view class="cu-item">
				0.42%
			</view>
	
			<view class="cu-item">
				0%
			</view>
		</view>
		
		<view class="cu-list grid text-black col-4">
				<view class="cu-item">
				信用卡
				</view>
				<view class="cu-item">
					0.51%
				</view>
				<view class="cu-item">
					0.52%
					<text>1元/笔</text>
				</view>
		
				<view class="cu-item">
					0%
				</view>
			</view>
			
			<view class="cu-list grid text-black col-4">
					<view class="cu-item">
					境外卡
					</view>
					<view class="cu-item">
						2.6%
					</view>
					<view class="cu-item">
						3%
						<text>1元/笔</text>
					</view>
			
					<view class="cu-item">
						0%
					</view>
				</view>
<!-- 扫码成本 -->
			
			
			<view class="cu-bar bg-gray solid-bottom margin-top">
				<view class="action text-df">
					<text>扫码成本</text>
			
				</view>
			</view>
			<view class="cu-list grid text-gray col-4">
					<view class="cu-item">
			
					</view>
					<view class="cu-item">
						T+1
					</view>
					<view class="cu-item">
						下级分成
					</view>
			
					<view class="cu-item">
						
					</view>
				</view>
				
				<view class="cu-list grid text-black col-4">
						<view class="cu-item">
						微信
						</view>
						<view class="cu-item">
							0.23%
						</view>
						<view class="cu-item">
							0%
						</view>
				
						<view class="cu-item">
							
						</view>
					</view>
					
					<view class="cu-list grid text-black col-4">
							<view class="cu-item">
							支付宝
							</view>
							<view class="cu-item">
								0.23%
							</view>
							<view class="cu-item">
								0%
							</view>
							
							<view class="cu-item">
								
							</view>
						</view>
					
<!-- 银联二维码成本 -->
			
					<view class="cu-bar bg-gray solid-bottom margin-top">
						<view class="action text-df">
							<text>银联二维码成本</text>
					
						</view>
					</view>
					
					<view class="cu-list grid text-gray col-4">
							<view class="cu-item">
					
							</view>
							<view class="cu-item">
							T+1
							</view>
							<view class="cu-item">
							下级分成
							</view>
							
							<view class="cu-item">
							
							</view>
						</view>
	
	<view class="cu-list grid text-black col-4">
			<view class="cu-item">
			借记卡
			</view>
			<view class="cu-item">
		
			</view>
			<view class="cu-item">
			
			</view>
			
			<view class="cu-item">
				
			</view>
		</view>

<view class="padding flex flex-direction">
		<button class="cu-btn bg-blue lg" style="height: 90upx;">提交</button>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formData: {
					account: '',
					password: '',
					name: '',
					phone: ''
				},
				inputType: 'text'
			}
		},
		methods: {
			// 返回页面
			onClickBack() {
				uni.navigateBack()
			},
			seePwd() {
				this.inputType === 'password' ? this.inputType = 'text' : this.inputType = 'password';
			},
			submit() {
				if (this.formData.account === '') {
					this.$refs.uToast.show({
						type: 'default',
						title: '默认主题',
						message: "请输入登录账号",
					})
					return
				}
				if (this.formData.password === '') {
					this.$refs.uToast.show({
						type: 'default',
						title: '默认主题',
						message: "请输入登录密码",
					})
					return
				}
				if (this.formData.phone === '') {
					this.$refs.uToast.show({
						type: 'default',
						title: '默认主题',
						message: "请输入业务员手机号",
					})
					return
				}
				if (this.formData.name === '') {
					this.$refs.uToast.show({
						type: 'default',
						title: '默认主题',
						message: "请输入业务员姓名",
					})
					return
				}

				this.list = []
				let params = {
					agentid: uni.getStorageSync("YNF_INFO").user_id,
					username: this.formData.account,
					password: this.formData.password,
					truename: this.formData.name,
					mobile: this.formData.phone
				}
				const res = this.$API({
					url: '/api/index/addagent',
					method: "POST",
					data: params
				})

				if (res.code === 1) {
					console.log(res);
				} else {
					uni.showToast({
						icon: 'none',
						title: res.msg
					})
				}
				// this.withdrawMoney()

			}
		}
	}
</script>

<style lang="scss" scoped>
	.padding-2 {
		padding: 25upx 40upx 25upx 40upx;
	}

	.style-color {
		padding: 20upx 40upx;
		margin-left: 420rpx;
		background-color: #1678ff;
	}
	//银联二维码成本
	.style-color2{
		padding: 20upx 40upx;
		margin-left: 335rpx;
		background-color: #1678ff;
	}
	.cu-list.grid{
		margin-bottom: -28upx;
	}
	.cu-list.grid>.cu-item:after{
		border: 0px;
	}
</style>
